<?php

/**
 * Test helper, must be included in every test case
 *
 * @author     Mon Zafra <monzee@gmail.com>
 * @package    Yano
 * @subpackage tests
 * @copyright  (c)2009 Mon Zafra
 * @license    New BSD
 */

error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
date_default_timezone_set('Asia/Manila');

define('HELPER_INCLUDED', true);
define('TEST_ROOT', realpath(substr(__FILE__, 0, strrpos(__FILE__, DIRECTORY_SEPARATOR))));
define('PROJECT_ROOT', realpath(TEST_ROOT . '/..'));
set_include_path(PROJECT_ROOT . PATH_SEPARATOR . get_include_path());

function __autoload($class)
{
    $translated = str_replace('_', DIRECTORY_SEPARATOR, $class);
    require $translated . '.php';
}
